package org.grow.pointcolor.tool;

import java.util.concurrent.atomic.AtomicBoolean;

public class MeasureAtomicBoolean extends AtomicBoolean {
    public MeasureAtomicBoolean(boolean initialValue) {
        super(initialValue);
    }

    public MeasureAtomicBoolean() {
        super();
    }

    public boolean measureGet(){
        boolean k  = super.get();
        super.set(!k);
        return k;
    }

    public boolean isRunning(Boolean b){
        if(b) {
            return super.get();
        }
        else {
           return measureGet();
        }

    }
}
